using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using BLL;
using BLL.Impl;

namespace WebUI.Capacity
{
    public partial class Capacity_List : BasicPage
    {
        private ICapacityManager capacityManager;
        protected void Page_Load(object sender, EventArgs e)
        {
            capacityManager = BLLFactory.CreateCapacityManager();
            if (!IsPostBack)
            {
                Display();
            }
        }

        private void Display()
        {
            this.grwViewCarriers.DataSource = capacityManager.ViewCarriers();
            this.grwViewCarriers.DataBind();
        }

        protected void grwViewCarriers_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            this.grwViewCarriers.PageIndex = e.NewPageIndex;
            Display();
        }
    }
}
